package campus.aiit.ssl.domain.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.sql.Time;
import java.util.Date;
import java.util.List;

@Getter@Setter
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Strategy {
  private Long id;

  private String name;

  private String userId;

  private Date createTime;

  private Date updateTime;

  /** User-Additional, not exist in original table */
  // private List<Week> weeks;  //old, deprecated
  @Valid private Weeks weeks;  //new
  @Getter@Setter
  public static class Weeks{
    @NotEmpty(message = "星期数组不允许为空")
    private byte[] days;

    private Time startTime;

    private Time endTime;

    private Integer summerLowestT;

    private Integer summerHighestT;

    private Integer summerConstantT;

    private Integer winterLowestT;

    private Integer winterHighestT;

    private Integer winterConstantT;
  }
}